// 查询列表
import request from "@/utils/request";

/**
 * 工单列表
 * @param data
 * @returns {AxiosPromise}
 */
export function listOrder (data) {
    return request({
        url: '/sxtyht-worder/wkOrder/getPageList',
        method: 'post',
        data: data
    })
}

export function updateWkOrder (data) {
    return request({ ///sxtyht-worder/wkOrder
        url: '/sxtyht-worder/wkOrder/updateWkOrder',
        method: 'post',
        data: data
    })
}

export function assignWkOrder (data) {
    return request({ ///sxtyht-worder/wkOrder
        url: '/sxtyht-worder/wkOrder/assignWkOrder',
        method: 'post',
        data: data
    })
}

export function gsHandle (data) {
    return request({ ///sxtyht-worder/wkOrder
        url: '/sxtyht-worder/wkOrder/gsHandle',
        method: 'post',
        data: data
    })
}

// 直接办理
export function compHandle (data) {
    return request({ ///sxtyht-worder/wkOrder
        url: '/sxtyht-worder/wkOrder/compHandle',
        method: 'post',
        data: data
    })
}

export function dyrqHandle (data) {
    return request({ ///sxtyht-worder/wkOrder
        url: '/sxtyht-worder/wkOrder/dyrqHandle',
        method: 'post',
        data: data
    })
}

export function getDyRqHandleNew (data) {
    return request({ ///sxtyht-worder/wkOrder
        url: '/sxtyht-worder/wkOrder/getDyRqHandleNew',
        method: 'post',
        data: data
    })
}

//延期审核通过
export function dyApprPassHandle (data) {
    return request({ ///sxtyht-worder/wkOrder
        url: '/sxtyht-worder/wkOrder/dyApprPassHandle',
        method: 'post',
        data: data
    })
}

//延期审核不通过
export function dyApprNoPassHandle (data) {
    return request({ ///sxtyht-worder/wkOrder
        url: '/sxtyht-worder/wkOrder/dyApprNoPassHandle',
        method: 'post',
        data: data
    })
}

//撤销工单
export function cancelHandle (data) {
    return request({ ///sxtyht-worder/wkOrder
        url: '/sxtyht-worder/wkOrder/cancelHandle',
        method: 'post',
        data: data
    })
}

//退回工单
export function returnHandle (data) {
    return request({ ///sxtyht-worder/wkOrder
        url: '/sxtyht-worder/wkOrder/returnHandle',
        method: 'post',
        data: data
    })
}

//查看工单处理过程
export function getHandleList (data) {
    return request({ ///sxtyht-worder/wkOrder
        url: '/sxtyht-worder/wkOrder/getHandleList',
        method: 'post',
        data: data
    })
}

/**
 * 工单详情
 * @param prdId
 * @returns {AxiosPromise}
 */
export function getOrderById (pkId) {
    return request({
        url: '/sxtyht-worder/wkOrder/getOrderById/' + pkId,
        method: 'get'
    })
}

export function getOrderByOrigId (origId, origin) {
    return request({
        url: '/sxtyht-worder/wkOrder/getOrderByOrigId/' + origId + "/" + origin,
        method: 'get'
    })
}

/**
 * 工单反馈
 * @param prdId
 * @returns {AxiosPromise}
 */
export function getOrderFbByOrderId (query) {
    return request({
        url: '/wbzj-biz/wkOrder/getOrderFb',
        method: 'get',
        params: query
    })
}

/**
 * 查询工单进度
 * @param prdId
 * @returns {AxiosPromise}
 */
export function listOrderFlowByOrderId (query) {
    return request({
        url: '/wbzj-biz/wkOrder/getOrderFlowList',
        method: 'get',
        params: query
    })
}

// 分配师傅
export function assignWorker (data) {
    return request({
        url: '/wbzj-biz/wkOrder/assignWorkerMan',
        method: 'post',
        data: data
    })
}

// 关闭工单
/*export function closeWkOrder(data) {
    return request({
        url: '/wbzj-biz/wkOrder/closeWkOrder',
        method: 'post',
        data: data
    })
}*/
export function closeWkOrderByOrderId (orderId) {
    return request({
        url: '/wbzj-biz/wkOrder/closeWkOrder/' + orderId,
        method: 'post'
    })
}

export function updatePfmRemark (data) {
    return request({
        url: '/wbzj-biz/wkOrder/updatePfmRemark',
        method: 'post',
        data: data
    })
}

// 获取详情接单公司
export function getAsgnDeptListByOrderId (orderId) {
    return request({
        url: '/sxtyht-worder/wkOrder/getAsgnDeptListByOrderId',
        method: 'get',
        params: { "orderId": orderId }
    })
}

// 获取直接办理的数据
export function getWorkOrderHandleCfin (orderId) {
    return request({
        url: '/sxtyht-worder/wkOrder/getWorkOrderHandleCfin/' + orderId,
        method: 'get'
    })
}

/**
 * 热户号异常信息对比
 * @param orderId
 * @returns {*}
 */
export function getWorkOrderHetAcctHumExpCmp (orderId) {
    return request({
        url: '/sxtyht-worder/wkOrder/getWorkOrderHetAcctHumExpCmp/' + orderId,
        method: 'get'
    })
}



